package com.example.xyxwebbackend001.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.xyxwebbackend001.model.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    @Select("SELECT signature FROM user_info WHERE user_id = #{userId}")
    String getSignatureByUserId(@Param("userId") Integer userId);

    int updateUserProfile(@Param("userId") Integer userId, @Param("sex") String sex,
                          @Param("signature") String signature, @Param("profile") String profile,
                          @Param("cityId") String cityId, @Param("interestedCulture") String interestedCulture);
    @Select("SELECT * FROM user_info WHERE user_id = #{userId}")
    UserInfo getUserInfoList(@Param("userId") Integer userId);
}
